-
Notifications
You must be signed in to change notification settings - Fork 39
Add mkl::linalg_svd relative Ops #1511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
yucai-intel
commented
Mar 26, 2025
•
edited
Loading
edited
- linalg_svd
- linalg_svd.U
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reactivate some skipped cases such as https://github.com/intel/torch-xpu-ops/blob/main/test/xpu/skip_list_common.py#L1397. Otherwise, CI cannot test with these svd cases.
56cebb3
to
9ac4024
Compare
e13dc4f
to
da85fe6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for MKL-based SVD operations on the XPU backend, including new composite functions and updates to native function definitions for linalg_svd and related ops. Key changes include:
- New YAML definitions for _linalg_svd and linalg_svd (and their variants) exposing the compute_uv flag.
- Removal of several SVD-related skip tests in the xpu test skip list.
- New MKL-based implementation files for BatchLinearAlgebra (header and source) and updated XPU dispatch registration.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
yaml/native/native_functions.yaml | Added definitions for new SVD ops and composite functions. |
test/xpu/skip_list_common.py | Removed skip tests for SVD float64 variants on XPU. |
src/ATen/native/xpu/mkl/BatchLinearAlgebra.h | Declared the svd_mkl prototype. |
src/ATen/native/xpu/mkl/BatchLinearAlgebra.cpp | Implemented the svd_mkl function using oneMKL calls. |
src/ATen/native/xpu/BatchLinearAlgebra.cpp | Registered the XPU dispatch for the SVD kernel. |
Files not reviewed (1)
- src/ATen/native/xpu/XPUFallback.template: Language not supported
@@ -9350,3 +9350,22 @@ | |||
variants: function | |||
dispatch: | |||
XPU: _fft_r2c_xpu_out | |||
|
|||
# This function is exposes the `compute_uv` flag, which is then used to implement `linalg.svd` and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider correcting the grammatical error in the comment. Perhaps change 'is exposes' to 'exposes'.
# This function is exposes the `compute_uv` flag, which is then used to implement `linalg.svd` and | |
# This function exposes the `compute_uv` flag, which is then used to implement `linalg.svd` and |
Copilot uses AI. Check for mistakes.